package dao_Impl;

import interfaces.DALException;

import java.sql.SQLException;
import java.util.ArrayList;
import java.util.List;

import dto_objects.AuthorDTO;
import dto_objects.BookDTO;
import dto_objects.FakturaDTO;

public class TST_faktura {

	/**
	 * @param args
	 */
	public static void main(String[] args) {
		try {
			new connector.Connector();
		} catch (InstantiationException | IllegalAccessException
				| ClassNotFoundException | SQLException e) {
			e.printStackTrace();
		}
		
		MySQLFakturaDAO testFak = new MySQLFakturaDAO();
		try {
			List<FakturaDTO> temp = testFak.getFakturaByUsrID(6, 1);
			System.out.println(temp.size());
			System.out.println();
			
			for (FakturaDTO emp : temp) {
				System.out.println(emp.getFakID() + "\n" + emp.getUsrID() + "\n" + emp.getBookID() + "\n" + emp.getLoan_date() + "\n" + emp.getLoan_date());
				System.out.println();
			}
			System.out.println("YES!");
		} catch (DALException e) {
			// TODO Auto-generated catch block
			e.printStackTrace();
		}

	}

}
